@import '~components/constants.scss';

.table {
  overflow: hidden;
  border-radius: $base_border_radius;
  margin-bottom: 16px;
  border: 1px solid $grey_background;
  font-weight: 500;

  &.unfocused {
    box-shadow: none;
  }

  &.loading {
    opacity: 0.5;

    .tr .item .line {
      pointer-events: none;
      border-radius: var(--default-border-radius-large);
      height: 16px;
      margin-top: 8px;
      width: 200px;
      animation-duration: 1s;
      animation-fill-mode: forwards;
      animation-iteration-count: infinite;
      animation-name: placeHolderShimmer;
      animation-timing-function: linear;
      background-repeat: repeat !important;
      background-image: linear-gradient(
        to right,
        var(--grey-light) 0px,
        #f2f2f2 120px,
        var(--grey-light) 234px
      ) !important;

      & > * {
        opacity: 0 !important;
      }
    }
  }

  .headerTable {
    background: $grey_background;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    padding: 8px;
    border-bottom: 1px solid $grey_background;
  }

  .footerTable {
    text-align: center;
    line-height: 32px;
    font-size: 14px;
    padding: 5px 10px;
    border-top: 1px solid $grey_background;
    border-bottom: 1px solid $grey_background;
  }
  .contentTable {
    .tr {
      display: flex;
      border-bottom: 1px solid $grey_background;
      padding: 8px;
      font-size: 12px;

      &:hover {
        background: $grey_background;
      }

      &:last-child {
        border-bottom: none;
      }

      & > div {
        position: relative;
        min-height: 32px;

        & > .absolute_position {
          width: 100%;
          position: absolute;
          height: 100%;
          display: flex;
        }
      }
    }

    .fix_text_padding_medium {
      padding: 8px 0;
      display: inline-block;
      line-height: 18px;
    }

    .text-complete-width {
      overflow: hidden;
      flex: 1;
      white-space: nowrap;
      text-overflow: ellipsis;
    }
  }
}
